package com.konne.nightmare.FastPublicOpinion.ui.personal.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.konne.nightmare.FastPublicOpinion.R;
import com.konne.nightmare.FastPublicOpinion.base.BaseMvpActivity;
import com.konne.nightmare.FastPublicOpinion.base.BaseMvpPresenter;
import com.konne.nightmare.FastPublicOpinion.ui.personal.adapter.DeviceAdapter;
import com.konne.nightmare.FastPublicOpinion.ui.personal.adapter.HelpAdapter;
import com.konne.nightmare.FastPublicOpinion.utils.LoadProgressDialog;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * @Author: chen
 * @UpdateDate: 1/23/22
 * @UpdateRemark: 帮助中心
 */
public class HelpCenterActivity extends BaseMvpActivity implements View.OnClickListener{

    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.img_back)
    ImageView imgBack;
    @BindView(R.id.rcl_list)
    RecyclerView rclList;
    private HelpAdapter helpAdapter;
    List<String> helpList = new ArrayList<>();
    @Override
    protected BaseMvpPresenter createPresenter() {
        return new BaseMvpPresenter();
    }

    @Override
    public int getLayout() {
        return R.layout.activity_help_center;
    }

    @Override
    public void initView() {
        initImmersionBar(R.color.white,true);
        tvTitle.setText("帮助中心");

        helpList.add("安装、使用问题");
        helpList.add("产品介绍");
        helpList.add("安全隐私");
        helpList.add("产品介绍");
        helpAdapter = new HelpAdapter(R.layout.item_help_list,helpList);
        rclList.setLayoutManager(new LinearLayoutManager(this));
        rclList.setAdapter(helpAdapter);
    }

    @Override
    public void initData(Bundle savedInstanceState) {

    }
    @OnClick({R.id.img_back})
    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.img_back:
                finish();
                break;


        }
    }
    @Override
    public LoadProgressDialog getLoadDialog() {
        return dialog;
    }

    @Override
    public void cancelLoadDialog() {
        if (dialog != null && dialog.isShowing()) {
            dialog.cancel();
        }
    }
}


